package act.state;

/**
 * @Author: fxy
 * @Date: 2022/03/16/15:27
 * @Description:
 */
public interface State {
    void doAction(Context context);
}
class StartState implements State {

    public void doAction(Context context) {
        System.out.println("Player is in start state");
        context.setState(this);
    }

    public String toString(){
        return "Start State";
    }
}
class StopState implements State {

    public void doAction(Context context) {
        System.out.println("Player is in stop state");
        context.setState(this);
    }

    public String toString(){
        return "Stop State";
    }
}